#include<iostream>

using namespace std;

int main()
{
 	int a[]={1,3,2,4,6,5,8,7,9};
 	int max,min,i,sum=0;
 	int average;
 	max=a[0];
 	min=a[0];
 	for(i=0;i<9;i++)
 	{
 		if(max<=a[i])
 			max=a[i];
 		if(min>=a[i])
 			min=a[i];
 	}
 	for(i=0;i<9;i++)
 	{
 		sum+=a[i];
 	}
 	average=(sum-min-max)/7;
 	cout<<"Average score:"<<average<<endl;
 	return 0;

} 
